#ifndef MACACTION_H
#define MACACTION_H
#include "docentity.h"
#include "user.h"
#include <QDate>

class MacAction : public DocEntity
{
    Q_OBJECT
public:
    explicit MacAction(const bool&Inner, QTreeWidget* parent=0);
    QDate expiry() const;
    User* author();
    void giveBithTo();
    QWidget* view(DocEntity::ViewTypes viewType=Normal);
    bool saveToDB();
    bool inner() const;
    void refresh(const RefreshType &refreshType);
protected:
    QString capTemplate();
    bool removeFromDB();
    bool isCorrect();
private:
    QDate m_expiry;
    User* m_author;
    bool m_inner;
public slots:
    void setExpiry(const QDate&Expiry);
    void setAuthor(User* user);
private slots:
    void onTableItemClick(int row, int column);
    void appendDisparition();
};

#endif // MACACTION_H
